package com.apple.ist.ets.arc.albatross.common.utils;

import java.io.Serializable;
import java.util.UUID;

import org.hibernate.engine.SessionImplementor;
import org.hibernate.id.SequenceGenerator;

public class UUIDGenerator extends SequenceGenerator {
	@Override
	public Serializable generate(SessionImplementor session, Object obj) {
		return getUUID();
	}

	public static String getUUID() {
		return UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
	}
}
